package com.bi.onlineEducation.service;

import com.bi.onlineEducation.dao.CommentInfoDao;
import com.bi.onlineEducation.domain.CommentInfoPo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: chenYuTao
 * @Time: 2022/1/19 20:57
 * @Description: 用户登录业务处理层
 **/
@Service
public class CommentInfoService {

    @Resource
    private CommentInfoDao dao;


    public List<CommentInfoPo> findAll() {
        List<CommentInfoPo> daoAll = dao.findAll();
        return daoAll;
    }

    public CommentInfoPo findById(Integer id) {
        return dao.findById(id).get();
    }

    public CommentInfoPo save(CommentInfoPo commentInfoPo) {
        return dao.save(commentInfoPo);
    }

    public Boolean deleteById(Integer id) {
        dao.deleteById(id);
        return true;
    }
}
